package com.yidu.DailyFinalTreatment.mapper;

import com.yidu.DailyFinalTreatment.entity.FundTwoFees;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
@Mapper
public interface FundTwoFeesMapper {
    @Select("SELECT *,ROUND((n.capital*f.custodianCost/100/365),2) AS custodianInterest,\n" +
            "ROUND((n.capital*f.bankCost/100/365),2) AS bankInterest FROM \n" +
            "(SELECT * FROM fund)f JOIN\n" +
            "(SELECT * FROM netWorth WHERE projectName='资产净值' and ${date})n ON f.fundId=n.fundId")
    public List<FundTwoFees> fundTwoFeesSelect(Map map);
}
